<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/resource/common/taglib.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>添加</title>
<%@include file="/resource/common/jquery.jspf"%>
<%@include file="/resource/common/commonCss.jspf"%>
<%@include file="/resource/common/bootstrap.jspf"%>
<%@include file="/resource/common/validate.jspf"%>
<script type="text/javascript" src="${ctxStatic }/js/system/asyncDoSubmitForm.js"></script>

</head>
<body>
	<div id="body-wrapper">
		<div id="main-content">
			<div class="content-box" >
				<div class="content-box-content">
					<div class="tab-content default-tab" id="tab1">
						<fieldset>
							<input type="hidden" id="asyncResult" name="asyncResult" value="-1" />
							<input type="hidden" id="asyncResultData" name="asyncResultData" value="-1" />
							<input type="hidden" id="asyncResultError" name="asyncResultError" value="-1" />
							<form:form id="inputForm" name="form1" class="form-horizontal" method="post" action="saveWebCityTemperature.do" modelAttribute="WebCityTemperature">
								<div class="row">
									<div class="col-md-6 col-sm-6 col-xs-6" >
										<input type="hidden" id="id" name="id" value="${entity.id}" /> 
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">类型:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<select name="type" id="type" class="form-control input-sm">
													<option value="1" <c:if test="${entity.type==1 }">selected="selected"</c:if>>平均最低温度</option>
													<option value="2" <c:if test="${entity.type==2 }">selected="selected"</c:if>>平均最高温度</option>
												</select>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">城市:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<select name="cityId" id="cityId" class="form-control input-sm">
													<option value="">==请选择==</option>
													<c:forEach var="item" items="${city_list }" varStatus="s">
														<option value="${item.id}" <c:if test="${item.id == entity.cityId }"> selected="selected"</c:if>> ${item.chineseName } </option>
													</c:forEach>
												</select>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">一月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.jan}" name="jan" id="jan"  placeholder="一月"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">二月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.feb}" name="feb" id="feb"  placeholder="二月"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">三月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.mar}" name="mar" id="mar"  placeholder="三月"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">四月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.apr}" name="apr" id="apr"  placeholder="四月"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">五月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.may}" name="may" id="may"  placeholder="五月"/>
											</div>
										</div>


									</div>
									<div class="col-md-6 col-sm-6 col-xs-6" >
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">六月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.jun}" name="jun" id="jun"  placeholder="六月"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">七月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.jul}" name="jul" id="jul"  placeholder="七月"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">八月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.aug}" name="aug" id="aug"  placeholder="八月"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">九月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.sep}" name="sep" id="sep"  placeholder="九月"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">十月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.oct}" name="oct" id="oct"  placeholder="十月"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">十一月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.nov}" name="nov" id="nov"  placeholder="十一月"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">十二月:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.dec}" name="dec" id="dec"  placeholder="十二月"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">状态:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<select name="status" id="status" class="form-control input-sm">
													<option value="true" <c:if test="${entity.status==true }">selected="selected"</c:if>>开启</option>
													<option value="false" <c:if test="${entity.status==false }">selected="selected"</c:if>>关闭</option>
												</select>
											</div>
										</div>
									</div>
								</div>
							</form:form>
						</fieldset>
					</div>
				</div>
				<!-- End .content-box-content -->
			</div>
		</div>
		<!-- End #main-content -->
	</div>
<script type="text/javascript">
var result = 0;
var validateForm;
//ShowEditor("#memo", "word_count");
$(document).ready(function() {
	validateForm = $("#inputForm").validate({
		rules : {
			type : {
				required : true
			},
			cityId : {
				required : true
			},
			status : {
				required : true
			}
		},
		messages : {
			type : {
				required : "类型,1平均最低温度,2平均最高温度不能为空"
			},
			cityId : {
				required : "城市ID不能为空"
			},
			status : {
				required : "状态不能为空"
			}
		},
		errorElement : "em",
		errorClass : "validate_error",
		submitHandler: function(form) { //通过之后回调
		},
		invalidHandler: function(form, validator) {
			return false;
		}
	});
});

</script>	
</body>
<!-- Download From www.exet.tk-->
</html>